<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<meta name="description" content="">
		<meta name="author" content="">

		<title>我的电动车</title>
		<!-- Bootstrap core CSS -->
		<link href="asserts/css/bootstrap.min.css" rel="stylesheet">

		<!-- Custom styles for this template -->
		<link href="asserts/css/dashboard.css" rel="stylesheet">
	</head>

	<body>
	<div th:insert="common/bar::top"></div>

		<div class="container-fluid">
			<div class="row">
				<div th:insert="common/bar::#left"></div>

				<main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
					<div class="table-responsive">
						<h2>有行驶证的电动车</h2>
						<table class="table table-striped table-sm">
							<thead>
								<tr>
									<th>车牌号</th>
									<th>品牌</th>
									<th>卖方商家和地址</th>
									<th>首次注册时间</th>
									<th>备注</th>
									<th>照片</th>
									<th>状态</th>
								</tr>
							</thead>
							<tbody>
							<tr th:each="emp:${session.haveEvidenceebickList}">
								<td th:text="${emp.ebickID}"></td>
								<td th:text="${emp.brand}"></td>
								<td th:text="${emp.buyfrom}"></td>
								<td th:text="${emp.firstRegistTime}"></td>
								<td th:text="${emp.details}"></td>
								<td>
                                <img style="width: 100px" th:src="${emp.image eq null ? 'asserts/img/YSU.jpg':emp.image}" alt="">
                            </td>
								<td th:text="${emp.status}"></td>
							</tr>
							</tbody>
						</table>
						<h2>没有行驶证的电动车</h2>
						<table class="table table-striped table-sm">
							<thead>
							<tr>
								<th>车牌号</th>
								<th>品牌</th>
								<th>卖方商家和地址</th>
								<th>首次注册时间</th>
								<th>备注</th>
								<th>照片</th>
								<th>状态</th>
								<th>操作</th>
							</tr>
							</thead>
							<tbody>
							<tr th:each="emp:${session.notHaveEvidenceebickList}">
								<td th:text="${emp.ebickID}"></td>
								<td th:text="${emp.brand}"></td>
								<td th:text="${emp.buyfrom}"></td>
								<td th:text="${emp.firstRegistTime}"></td>
								<td th:text="${emp.details}"></td>
								<td>
                                    <img style="width: 100px" th:src="${emp.image eq null ? 'asserts/img/YSU.jpg':emp.image}" alt="">
                                </td>
								<td th:text="${emp.status}"></td>
								<td>
									<a th:href="@{/applyForDrivingLicense.do(ebickID=${emp.ebickID})}">
										<button class="btn btn-sm btn-danger">申请行驶证明</button>
									</a>
									<a >
										<button class="btn btn-sm btn-danger">售卖</button>
									</a>
									<a th:href="@{/cancleApplyForDrivingLicense.do(ebickID=${emp.ebickID})}">
										<button class="btn btn-sm btn-danger" >撤回申请</button>
									</a>
								</td>
							</tr>
							</tbody>
						</table>
					</div>
				</main>
			</div>
			<a type="hidden" id="applyForMessage" th:text="${session.applyForMessage eq null ? 'null' : session.applyForMessage}"></a>
		</div>

	<script type="text/javascript" src="asserts/js/jquery-3.2.1.slim.min.js"></script>
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script src="asserts/js/popper.min.js"></script>
	<script src="asserts/js/feather.min.js"></script>
	<script src="asserts/js/bootstrap.min.js"></script>

		<script>
			window.onload=function() {
				var message = document.getElementById("applyForMessage").innerText;
				console.log("message");
				console.log(message);
				if(message!="null"){
					alert(message);
					location.href="clearMessage.do?sessionItem=applyForMessage&from=showAllMyEbick";
				}
				//alert(message);
			}
		</script>



	</body>

</html>